package hedron.command;

import hedron.Application;
import hedron.view.CalendarView;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;

public class ViewCalendarHandler extends AbstractHandler {

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		try {
			IWorkbenchPage page = Application.getActivePage();
			page.showView(CalendarView.ID);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
		return null;
	}

}
